<script type="text/javascript" src="{{ asset('/lib/wangEditor/js/wangEditor.js') }}"></script>
<style type="text/css">
    #editor-trigger {
        height: 300px;
        max-height: 500px;
    }
    .container {
        width: 90%;
        margin: 0 auto;
        position: relative;
    }
</style>
<script type="text/javascript">
    var editor = new wangEditor('wangEditor');

    // 上传图片
    editor.config.uploadImgUrl = '/picture';
    //设置图片名字
    editor.config.uploadImgFileName = 'myFileName';
    // 配置自定义参数
    editor.config.uploadParams = {
        token: 'anyuzhe',
        user: 'anyuzhe'
    };

    // 设置 headers
    editor.config.uploadHeaders = {
        'Accept' : 'text/x-json'
    };

    // 隐藏掉插入网络图片功能。该配置，只有在你正确配置了图片上传功能之后才可用。
    editor.config.hideLinkImg = true;

    editor.create();
</script>